# -*- coding: utf-8 -*-
"""
date: Thu Dec 13 14:33:51 2018
python: Anaconda 3.6.5
author: kanade
email: kanade@blisst.cn
"""
import matplotlib.pyplot as mp


mp.xlim(-10, 10)
mp.ylim(-5, 5)
# 设置坐标刻度
mp.xticks([-10, -5, 0, 5, 10])
mp.yticks([-5, -2, 0, 2, 5])
# 获取当前坐标系
ax = mp.gca()
# 设置位置
ax.spines['left'].set_position(('data',0))
ax.spines['bottom'].set_position(('data',0))
# 设置上右坐标轴不显示
ax.spines['right'].set_color('none')
ax.spines['top'].set_color('none')

# 画点
mp.scatter([-1, -2, -4], [-1, -2, -4], marker='D', 
           s=30, edgecolor='limegreen', facecolor='red',
           zorder=4)
mp.scatter([1, 2, 4], [1, 2, 4], marker='+', 
           s=50, color='blue')
# 添加说明信息
mp.annotate(r'(1,1)', xy=(1, 1),xycoords='data',
            xytext=(20, -20), textcoords='offset points',
            fontsize=14,
            arrowprops=dict(arrowstyle='->',
                            connectionstyle='arc3, rad=.2'))
mp.annotate(r'(-2,-2)', xy=(-2, -2),xycoords='data',
            xytext=(-30, 25), textcoords='offset points',
            fontsize=15,
            arrowprops=dict(arrowstyle='->',
                            connectionstyle='arc3, rad=.5'))
mp.show()









